#ifndef __I_VIDEO_HANDLER_H_INCLUDED__
#define __I_VIDEO_HANDLER_H_INCLUDED__
#include "IUnknown.h"
#include "delegate1.h"
#include "irrString.h"

namespace irr
{
	namespace video
	{
		class ITexture;
	}
}

namespace game
{
	namespace scene
	{
		struct STextureEntry;
	}

	namespace video
	{
		//! Use this class for make some actions in main render thread
		class IVideoHandler : public irr::IUnknown
		{
		public:
			//! Destructor
			virtual ~IVideoHandler()
			{
			}

			typedef C_DELEGATE<void, void*> delegateAction;

			//! Adds action for run in main render thread
			virtual void pushAction(delegateAction* action) = 0;

			//! Gets next action for run it in main render thread. Action was delete from delegates storage. 
			virtual delegateAction* popAction() = 0;

			//! Gets actions count
			virtual u32 getSize() = 0;

			//! Gets texture in video thread
			virtual irr::video::ITexture* getTexture(const c8* file, const c8* name = "") = 0;

			//! Load texture to entry
			virtual void getTexture(scene::STextureEntry* entry) = 0;

		};
	}

}
#endif